package com.axjy.service.impl;

import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleSelectRestriction;
import com.axjy.dao.RoleMapper;
import com.axjy.pojo.Role;
import com.axjy.service.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by asus on 2017/9/18.
 */
@Service("roleService")
@Transactional
public class RoleServiceImpl implements RoleService{

    @Resource
    private RoleMapper roleMapper;

    @Transactional(readOnly = true)
    public List<Role> list() {
        return roleMapper.list();
    }

    public int add(Role role) {
        return roleMapper.add(role);
    }
}
